package com.wjk.kylin.mall.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;

@ServletComponentScan
@EnableFeignClients(basePackages = "com.wjk.kylin.mall.order.feign")
@MapperScan("com.wjk.kylin.mall.order.mapper")
@EnableDiscoveryClient
@SpringBootApplication
//The bean 'rabbitProducer' could not be injected because it is a JDK dynamic proxy
//Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.
@EnableAsync(proxyTargetClass = true)
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

}
